package dao;

import entity.User;

import java.util.List;

/**
 * @program: FinalExam
 * @description:
 * @create: 2021-12-14 17:11
 * @Date 2021/12/14
 **/

public interface UserDao {

    public User adminLogin(String username ,String password);

    public User userLogin(String username ,String password);
    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    public User login(String username ,String password);


    /**
     * 添加用户
     * @param user
     * @return
     */
    public Boolean addUser(User user);

    /**
     * 根据id删除用户
     * @param id
     * @return
     */
    public Boolean deleteUserById(String id,String gmt_modify);

    /**
     * 根据用户id进行修改
     * @param id
     * @param user
     * @return
     */
    public Boolean modifyUserInfoById(String id ,User user);

    /**
     * 展示所有用户信息
     * @return
     */
    public List<User> ShowUsersInfo();

    /**
     * 根据id查找用户
     * @param id
     * @return
     */
    public User findById(String id) ;

    User findByUsername(String username);

    User findByIdAndUsername(String id, String username);

    void modifyPassword(String id, String password);

    List<User> findAllUserInfo();


}
